# _*_ coding: utf-8 _*_
from odoo import models, fields, api


class StockProductionLot(models.Model):
    _inherit = "stock.production.lot"

    code = fields.Char("Code", size=10)
    description = fields.Char("Description", size=20)
    board_number = fields.Char(u"内部参考", size=20)

    # @api.multi
    # def name_get(self):
    #     res = []
    #     for lot in self:
    #         if lot.code or lot.description or lot.board_number:
    #             name = lot.name + "("
    #             if lot.code:
    #                 name += lot.code
    #             name += ","
    #             if lot.description:
    #                 name += lot.description
    #             name += ","
    #             if lot.board_number:
    #                 name += lot.board_number
    #             name += ')'
    #         else:
    #             name = lot.name
    #         if lot.ref:
    #             name = lot.ref + "-" + name
    #         res.append((lot.id, name))
    #     return res
